/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tiebreak.BL;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import tiebreak.BE.Member;
import tiebreak.DAL.MemberDA;

/**
 *
 * @author kennet
 */
public class MemberManager
{

    static int addMember(Member member) throws SQLException, IOException
    {
        MemberDA mDA = new MemberDA();
       return mDA.addMember(member);
    }

    static Member getMemberWithCpr(int cpr) throws SQLException, IOException
    {
        MemberDA mDA = new MemberDA();
        return mDA.getMemberWithCpr(cpr);
    }

    static Member getMemberWithMemberID(int memberID) throws SQLException, IOException
    {
        MemberDA mDA = new MemberDA();
        return mDA.getMemberWithMemberID(memberID);
    }

    static void updateMember(Member member) throws SQLException, IOException
    {
        MemberDA mDA = new MemberDA();
        mDA.updateMember(member);
    }

    
    static void delete(int memberID) throws SQLException
    {
        MemberDA md = new MemberDA();
        md.deleteMember(memberID);
    }

}
